﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TowerDefense.Actors {
    public class Actor
    {
        protected bool moveable;

        //public static List<Actor> Actors = new List<Actor>();
       // private static Grid<Actor> grid;

        protected Texture2D texture;
        protected Vector2 origin;
        protected Vector2 direction;
        protected Color color;
        protected Location goal;

        protected readonly int gridBoxSize = 50;

        public Actor(Location start)
        {
            goal = start;
        }

        public Vector2 GetWorldLocation(Location loc)
        {
            return new Vector2(loc.getCol() * gridBoxSize, loc.getRow() * gridBoxSize);
        }

        public Actor(Texture2D texture, Color color)
        {
          
            //Actors.Add(this); //TODO: add it to the grid of actors instead of the list
            this.texture = texture;
            this.color = color;
            this.origin = new Vector2(texture.Width/2,texture.Height/2);
        }


        public virtual void Update()
        {
            //TODO: location changes in relation to speed at direction
        }

        public virtual void Draw(SpriteBatch spriteBatch, Location location)
        {
            
        }

    }
}
